package main

import (
	_ "github.com/go-sql-driver/mysql"

	"haochen233/horm"
	"haochen233/horm/log"
)

const dsn string = "root:123456@tcp(192.168.50.1:20001)/prac?charset=utf8&parseTime=True&loc=Local&timeout=3s"

func main() {
	e, err := horm.NewEngine("mysql", dsn)
	if err != nil {
		panic(err)
	}

	session := e.NewSession()
	session.Model(&User{})
	log.Info(session.HasTable())
}

type User struct {
	Name string `horm:""`
	Age  int
}
